<?php if(!in_array($data, array(null, '', '0'))):?>
    <div class="custom-line">
        <span id="agencyajax">
            <?php echo $fview->selectType($data, @$selected, 'agency', 0,'style="color: #333!important"')?>
        </span>
    </div>
<script type="text/javascript">
    $(document).ready(function(){
        $("select").parent("#agencyajax").addClass("select-custom").append("<a class='select-text'></a>");
        $("#agencyajax").each(function(){
            var text = $(this).find("option:selected").text();
            if(text.length === 0){
                var text =  $(this).find("select option:first-child").text();
            }
            $(this).find(".select-text").text(text);
        });
    });
</script>
<?php else:?>
    <h4>Xin lỗi chưa có bất kỳ 1 Agency nào được tìm thấy</h4>
<?php endif;?>